package com.sg.service.biz.component.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.component.req.*;
import com.sg.dto.biz.component.res.*;
import com.sg.service.base.component.MOmsUnstructuredDataService;
import com.sg.service.biz.component.InterfaceModeService;
import com.sg.service.biz.component.MobileEndShellService;
import com.sg.service.biz.component.nb.NbMobileFramework;
import com.sg.common.exception.Assert;
import com.wicket.okrcomponent.common.exception.BizException;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class MobileFrameworkServiceImpl
        implements com.wicket.okrcomponent.biz.service.MobileFrameworkService {

    @Resource
    private RedisUtil redisUtil;
    @Resource
    private MOmsUnstructuredDataService mOmsUnstructuredDataService;
    @Resource
    private NbMobileFramework nbMobileFramework;
    @Resource
    private InterfaceModeService interfaceModeService;
    @Resource
    private MobileEndShellService mobileEndShellService;

    /**
     * D2执行是否展示中层部门(公共)[9003]
     * gen by moon at 4/1/2024, 1:35:12 AM
     */
    @Trace(operationName = "D2执行是否展示中层部门(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ImplementIsShowMiddleLevelDeptComRespDto implementIsShowMiddleLevelDeptCom(ImplementIsShowMiddleLevelDeptComReqDto reqDto) {


        ImplementTenReceivingFieldRespDto receptionServiceRes_3 = null;
//virtualUsage M2接收部门业务身份约定是否  65831
        //ModelCode: receptionService
        ImplementTenReceivingFieldRespDto receptionServiceRes = null;
        ImplementTenReceivingFieldReqDto receptionServiceReq = new ImplementTenReceivingFieldReqDto();
        receptionServiceReq.setCustomField1("TRUE");//CUSTOM_CONVENTION//sourceId:1681042_1_65831
        receptionServiceReq.setCustomField2("FALSE");//CUSTOM_CONVENTION//sourceId:1681043_1_65831
        if (reqDto != null) {
            receptionServiceReq.setDeptBusinessIdentity(reqDto.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1680947_1_65831
        }

        /*M2接收部门业务身份约定是否[8782]  用于特殊方法接收上游入参。 */
        Assert.isNull(receptionServiceReq.getDeptBusinessIdentity(), "D2执行是否展示中层部门(公共)-M2接收部门业务身份约定是否-部门业务身份不能为空", false);
        Assert.isNull(receptionServiceReq.getCustomField1(), "D2执行是否展示中层部门(公共)-M2接收部门业务身份约定是否-自定义字段1不能为空", false);
        Assert.isNull(receptionServiceReq.getCustomField2(), "D2执行是否展示中层部门(公共)-M2接收部门业务身份约定是否-自定义字段2不能为空", false);
        receptionServiceRes = nbMobileFramework.implementTenReceivingField(receptionServiceReq);


        if ((reqDto != null && reqDto.getDeptBusinessIdentity() != null && reqDto.getDeptBusinessIdentity().equals("SCHOOL_LEADER"))) {
            //if(D2执行是否展示中层部门(公共).部门业务身份 等于 校领导)  65827

//ModelCode: receptionService
            ImplementTenReceivingFieldRespDto receptionServiceRes_2 = null;
            ImplementTenReceivingFieldReqDto receptionServiceReq_1 = new ImplementTenReceivingFieldReqDto();
            if (receptionServiceRes != null) {
                receptionServiceReq_1.setCustomField(receptionServiceRes.getCustomField2());//SimpleFieldAssign//sourceId:1681039_1_65829
            }

            /*M2接收是否[8782]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_1.getCustomField(), "D2执行是否展示中层部门(公共)-M2接收是否-自定义字段不能为空", false);
            receptionServiceRes_2 = nbMobileFramework.implementTenReceivingField(receptionServiceReq_1);


            receptionServiceRes_3 = receptionServiceRes_2;
        } else if ((!(reqDto != null && reqDto.getDeptBusinessIdentity() != null && reqDto.getDeptBusinessIdentity().equals("SCHOOL_LEADER")) && reqDto != null && reqDto.getDeptBusinessIdentity() != null)) {
            //elseif((D2执行是否展示中层部门(公共).部门业务身份 不等于 校领导 and D2执行是否展示中层部门(公共).部门业务身份 值不等于空 ))  65828

//ModelCode: receptionService
            ImplementTenReceivingFieldRespDto receptionServiceRes_4 = null;
            ImplementTenReceivingFieldReqDto receptionServiceReq_2 = new ImplementTenReceivingFieldReqDto();
            if (receptionServiceRes != null) {
                receptionServiceReq_2.setCustomField(receptionServiceRes.getCustomField1());//SimpleFieldAssign//sourceId:1681039_1_65830
            }

            /*M2接收是否[8782]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_2.getCustomField(), "D2执行是否展示中层部门(公共)-M2接收是否-自定义字段不能为空", false);
            receptionServiceRes_4 = nbMobileFramework.implementTenReceivingField(receptionServiceReq_2);


            receptionServiceRes_3 = receptionServiceRes_4;
        }
        ImplementIsShowMiddleLevelDeptComRespDto retData = new ImplementIsShowMiddleLevelDeptComRespDto();
        if (receptionServiceRes_3 != null) {
            retData.setCustomField(receptionServiceRes_3.getCustomField());//SimpleFieldAssign//sourceId:1681058_1
        }


        return retData;
    }

    /**
     * D2查询移动端主导航列表(公共)[8973]
     * gen by moon at 4/1/2024, 2:44:24 AM
     */
    @Trace(operationName = "D2查询移动端主导航列表(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryMobileMainNavigationListComRespDto queryMobileMainNavigationListCom(QueryMobileMainNavigationListComReqDto reqDto) {


        ImplementAdjustMainNavigationSortingComRespDto implementAdjustMainNavigationSortingComRespDto_1 = null;
//virtualUsage M2接收UCD导向的高层、我的部门、我的目标  65818
        //ModelCode: receptionService
        ImplementTenReceivingFieldRespDto receptionServiceRes = null;
        ImplementTenReceivingFieldReqDto receptionServiceReq = new ImplementTenReceivingFieldReqDto();
        receptionServiceReq.setCustomField1("TRUE");//CUSTOM_CONVENTION//sourceId:1680355_1_65818
        receptionServiceReq.setCustomField2("FALSE");//CUSTOM_CONVENTION//sourceId:1680356_1_65818
        if (reqDto != null) {
            receptionServiceReq.setMenuOrientedIdentification(reqDto.getMenuOrientedIdentification());//SimpleFieldAssign//sourceId:1680382_1_65818
            receptionServiceReq.setDeptBusinessIdentity(reqDto.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1678072_1_65818
        }

        /*M2接收UCD导向的高层、我的部门、我的目标[8782]  用于特殊方法接收上游入参。 */
        Assert.isNull(receptionServiceReq.getMenuOrientedIdentification(), "D2查询移动端主导航列表(公共)-M2接收UCD导向的高层、我的部门、我的目标-UCD菜单导向标识不能为空", false);
        Assert.isNull(receptionServiceReq.getDeptBusinessIdentity(), "D2查询移动端主导航列表(公共)-M2接收UCD导向的高层、我的部门、我的目标-部门业务身份不能为空", false);
        Assert.isNull(receptionServiceReq.getCustomField1(), "D2查询移动端主导航列表(公共)-M2接收UCD导向的高层、我的部门、我的目标-自定义字段1不能为空", false);
        Assert.isNull(receptionServiceReq.getCustomField2(), "D2查询移动端主导航列表(公共)-M2接收UCD导向的高层、我的部门、我的目标-自定义字段2不能为空", false);
        receptionServiceRes = nbMobileFramework.implementTenReceivingField(receptionServiceReq);


        if ((reqDto != null && reqDto.getMenuOrientedIdentification() != null && reqDto.getMenuOrientedIdentification().equals("SPACE_PLAN"))) {
            //if(D2查询移动端主导航列表(公共).UCD菜单导向标识 等于 高层目标任务)  65807

            AnalysisFieldBatchDataComRespDto analysisFieldBatchDataComRespDto = null;
            AnalysisFieldBatchDataComReqDto analysisFieldBatchDataComReqDto = new AnalysisFieldBatchDataComReqDto();
            analysisFieldBatchDataComReqDto.setCustomField1("SPACE_PLAN");//CUSTOM_CONVENTION//sourceId:1678968_1_65821
            analysisFieldBatchDataComReqDto.setCustomFieldValue1("1");//CUSTOM_CONVENTION//sourceId:1678969_1_65821
            analysisFieldBatchDataComReqDto.setCustomField2("MY_LEADER_PLAN");//CUSTOM_CONVENTION//sourceId:1678970_1_65821
            analysisFieldBatchDataComReqDto.setCustomFieldValue2("2");//CUSTOM_CONVENTION//sourceId:1678971_1_65821
            analysisFieldBatchDataComReqDto.setCustomField3("MY_DEPT_PLAN");//CUSTOM_CONVENTION//sourceId:1678972_1_65821
            analysisFieldBatchDataComReqDto.setCustomFieldValue3("3");//CUSTOM_CONVENTION//sourceId:1678973_1_65821
            analysisFieldBatchDataComReqDto.setCustomField4("MY_SUBORDINATE_PLAN");//CUSTOM_CONVENTION//sourceId:1678974_1_65821
            analysisFieldBatchDataComReqDto.setCustomFieldValue4("4");//CUSTOM_CONVENTION//sourceId:1678975_1_65821
            analysisFieldBatchDataComReqDto.setCustomField5("MY_PLAN");//CUSTOM_CONVENTION//sourceId:1678976_1_65821
            analysisFieldBatchDataComReqDto.setCustomFieldValue5("5");//CUSTOM_CONVENTION//sourceId:1678977_1_65821
            analysisFieldBatchDataComReqDto.setCustomField6("MY_REPORT");//CUSTOM_CONVENTION//sourceId:1678978_1_65821
            analysisFieldBatchDataComReqDto.setCustomFieldValue6("6");//CUSTOM_CONVENTION//sourceId:1678979_1_65821

            /*D2-约定高层菜单排序单字段批量转数据集(公共)[8405]   */
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomField1(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段1不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomFieldValue1(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段值1不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomField2(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段2不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomFieldValue2(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段值2不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomField3(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段3不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomFieldValue3(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段值3不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomField4(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段4不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomFieldValue4(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段值4不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomField5(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段5不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomFieldValue5(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段值5不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomField6(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段6不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto.getCustomFieldValue6(), "D2查询移动端主导航列表(公共)-D2-约定高层菜单排序单字段批量转数据集(公共)-自定义字段值6不能为空", false);
            analysisFieldBatchDataComRespDto = interfaceModeService.analysisFieldBatchDataCom(analysisFieldBatchDataComReqDto)/*vcase invoke isSameApp*/;


            ImplementIsShowMiddleLevelDeptComRespDto implementIsShowMiddleLevelDeptComRespDto = null;
            ImplementIsShowMiddleLevelDeptComReqDto implementIsShowMiddleLevelDeptComReqDto = new ImplementIsShowMiddleLevelDeptComReqDto();
            if (reqDto != null) {
                implementIsShowMiddleLevelDeptComReqDto.setDeptBusinessIdentity(reqDto.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1681062_1_65832
            }

            /*D2执行是否展示中层部门(公共)[9003]   */
            Assert.isNull(implementIsShowMiddleLevelDeptComReqDto.getDeptBusinessIdentity(), "D2查询移动端主导航列表(公共)-D2执行是否展示中层部门(公共)-部门业务身份不能为空", false);
            implementIsShowMiddleLevelDeptComRespDto = implementIsShowMiddleLevelDeptCom(implementIsShowMiddleLevelDeptComReqDto)/*vcase invoke 同服务,同domain*/;


            ImplementAdjustMainNavigationSortingComRespDto implementAdjustMainNavigationSortingComRespDto = null;
            if (analysisFieldBatchDataComRespDto != null && implementIsShowMiddleLevelDeptComRespDto != null) {
                ImplementAdjustMainNavigationSortingComReqDto implementAdjustMainNavigationSortingComReqDto = new ImplementAdjustMainNavigationSortingComReqDto();
                if (reqDto != null && reqDto.getMainNavMenusList() != null && !CollectionUtil.isEmpty(reqDto.getMainNavMenusList())) {
                    implementAdjustMainNavigationSortingComReqDto.setAdjustMainNavigationSortingList(reqDto.getMainNavMenusList().stream().map(item -> BeanUtil.toBean(item, AdjustMainNavigationSortingDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1679747_1_65823
                }
                if (analysisFieldBatchDataComRespDto != null && analysisFieldBatchDataComRespDto.getFieldBatchDataList() != null && !CollectionUtil.isEmpty(analysisFieldBatchDataComRespDto.getFieldBatchDataList())) {
                    implementAdjustMainNavigationSortingComReqDto.setAgreedNavigationSortingDatasetList(//objList-to-objLists
                            analysisFieldBatchDataComRespDto.getFieldBatchDataList().stream().map(item -> {
                                AgreedNavigationSortingDatasetDto elm = new AgreedNavigationSortingDatasetDto();
                                if (item != null) {
                                    elm.setMenuCode(item.getFieldName());//SimpleFieldAssign//sourceId:326348_2_65823
                                    elm.setMenuOrderNumber(item.getFieldValue());//SimpleFieldAssign//sourceId:326349_2_65823
                                }
                                return elm;
                            }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1679748_1_65823
                }
                if (receptionServiceRes != null) {
                    implementAdjustMainNavigationSortingComReqDto.setMyLeaderPlan(receptionServiceRes.getCustomField1());//SimpleFieldAssign//sourceId:1679749_1_65823
                    implementAdjustMainNavigationSortingComReqDto.setMySubordinatePlan(receptionServiceRes.getCustomField2());//SimpleFieldAssign//sourceId:1679750_1_65823
                    implementAdjustMainNavigationSortingComReqDto.setSpacePlan(receptionServiceRes.getCustomField1());//SimpleFieldAssign//sourceId:1680454_1_65823
                }
                if (implementIsShowMiddleLevelDeptComRespDto != null) {
                    implementAdjustMainNavigationSortingComReqDto.setMyDeptPlan(implementIsShowMiddleLevelDeptComRespDto.getCustomField());//SimpleFieldAssign//sourceId:1679752_1_65823
                }

                /*D2执行调整主导航排序(公共)[8988]   */
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto.getMyLeaderPlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-我分管中层目标任务是否可见不能为空", false);
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto.getMySubordinatePlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-我的下属目标任务是否可见不能为空", false);
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto.getMyDeptPlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-我的部门目标任务是否可见不能为空", false);
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto.getSpacePlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-高层目标任务是否可见不能为空", false);
                implementAdjustMainNavigationSortingComRespDto = mobileEndShellService.implementAdjustMainNavigationSortingCom(implementAdjustMainNavigationSortingComReqDto)/*vcase invoke isSameApp*/;


                implementAdjustMainNavigationSortingComRespDto_1 = implementAdjustMainNavigationSortingComRespDto;
            }
        } else if ((reqDto != null && reqDto.getMenuOrientedIdentification() != null && reqDto.getMenuOrientedIdentification().equals("MY_DEPT_PLAN"))) {
            //elseif(D2查询移动端主导航列表(公共).UCD菜单导向标识 等于 我的部门目标任务)  65808

            AnalysisFieldBatchDataComRespDto analysisFieldBatchDataComRespDto_2 = null;
            AnalysisFieldBatchDataComReqDto analysisFieldBatchDataComReqDto_1 = new AnalysisFieldBatchDataComReqDto();
            analysisFieldBatchDataComReqDto_1.setCustomField1("MY_DEPT_PLAN");//CUSTOM_CONVENTION//sourceId:1680328_1_65822
            analysisFieldBatchDataComReqDto_1.setCustomFieldValue1("1");//CUSTOM_CONVENTION//sourceId:1680329_1_65822
            analysisFieldBatchDataComReqDto_1.setCustomField2("MY_SUBORDINATE_PLAN");//CUSTOM_CONVENTION//sourceId:1680330_1_65822
            analysisFieldBatchDataComReqDto_1.setCustomFieldValue2("2");//CUSTOM_CONVENTION//sourceId:1680331_1_65822
            analysisFieldBatchDataComReqDto_1.setCustomField3("MY_PLAN");//CUSTOM_CONVENTION//sourceId:1680332_1_65822
            analysisFieldBatchDataComReqDto_1.setCustomFieldValue3("3");//CUSTOM_CONVENTION//sourceId:1680333_1_65822
            analysisFieldBatchDataComReqDto_1.setCustomField4("MY_REPORT");//CUSTOM_CONVENTION//sourceId:1680334_1_65822
            analysisFieldBatchDataComReqDto_1.setCustomFieldValue4("4");//CUSTOM_CONVENTION//sourceId:1680335_1_65822
            analysisFieldBatchDataComReqDto_1.setCustomField5("SPACE_PLAN");//CUSTOM_CONVENTION//sourceId:1680336_1_65822
            analysisFieldBatchDataComReqDto_1.setCustomFieldValue5("5");//CUSTOM_CONVENTION//sourceId:1680337_1_65822
            analysisFieldBatchDataComReqDto_1.setCustomField6("MY_LEADER_PLAN");//CUSTOM_CONVENTION//sourceId:1680338_1_65822
            analysisFieldBatchDataComReqDto_1.setCustomFieldValue6("6");//CUSTOM_CONVENTION//sourceId:1680339_1_65822

            /*D2-约定中层菜单排序单字段批量转数据集(公共)[8405]   */
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomField1(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段1不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomFieldValue1(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段值1不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomField2(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段2不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomFieldValue2(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段值2不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomField3(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段3不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomFieldValue3(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段值3不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomField4(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段4不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomFieldValue4(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段值4不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomField5(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段5不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomFieldValue5(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段值5不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomField6(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段6不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_1.getCustomFieldValue6(), "D2查询移动端主导航列表(公共)-D2-约定中层菜单排序单字段批量转数据集(公共)-自定义字段值6不能为空", false);
            analysisFieldBatchDataComRespDto_2 = interfaceModeService.analysisFieldBatchDataCom(analysisFieldBatchDataComReqDto_1)/*vcase invoke isSameApp*/;


            ImplementAdjustMainNavigationSortingComRespDto implementAdjustMainNavigationSortingComRespDto_2 = null;
            if (analysisFieldBatchDataComRespDto_2 != null) {
                ImplementAdjustMainNavigationSortingComReqDto implementAdjustMainNavigationSortingComReqDto_1 = new ImplementAdjustMainNavigationSortingComReqDto();
                if (reqDto != null && reqDto.getMainNavMenusList() != null && !CollectionUtil.isEmpty(reqDto.getMainNavMenusList())) {
                    implementAdjustMainNavigationSortingComReqDto_1.setAdjustMainNavigationSortingList(reqDto.getMainNavMenusList().stream().map(item -> BeanUtil.toBean(item, AdjustMainNavigationSortingDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1679747_1_65824
                }
                if (analysisFieldBatchDataComRespDto_2 != null && analysisFieldBatchDataComRespDto_2.getFieldBatchDataList() != null && !CollectionUtil.isEmpty(analysisFieldBatchDataComRespDto_2.getFieldBatchDataList())) {
                    implementAdjustMainNavigationSortingComReqDto_1.setAgreedNavigationSortingDatasetList(//objList-to-objLists
                            analysisFieldBatchDataComRespDto_2.getFieldBatchDataList().stream().map(item -> {
                                AgreedNavigationSortingDatasetDto elm = new AgreedNavigationSortingDatasetDto();
                                if (item != null) {
                                    elm.setMenuCode(item.getFieldName());//SimpleFieldAssign//sourceId:326348_2_65824
                                    elm.setMenuOrderNumber(item.getFieldValue());//SimpleFieldAssign//sourceId:326349_2_65824
                                }
                                return elm;
                            }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1679748_1_65824
                }
                if (receptionServiceRes != null) {
                    implementAdjustMainNavigationSortingComReqDto_1.setMyLeaderPlan(receptionServiceRes.getCustomField2());//SimpleFieldAssign//sourceId:1679749_1_65824
                    implementAdjustMainNavigationSortingComReqDto_1.setMySubordinatePlan(receptionServiceRes.getCustomField1());//SimpleFieldAssign//sourceId:1679750_1_65824
                    implementAdjustMainNavigationSortingComReqDto_1.setMyDeptPlan(receptionServiceRes.getCustomField1());//SimpleFieldAssign//sourceId:1679752_1_65824
                    implementAdjustMainNavigationSortingComReqDto_1.setSpacePlan(receptionServiceRes.getCustomField2());//SimpleFieldAssign//sourceId:1680454_1_65824
                }

                /*D2执行调整主导航排序(公共)[8988]   */
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto_1.getMyLeaderPlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-我分管中层目标任务是否可见不能为空", false);
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto_1.getMySubordinatePlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-我的下属目标任务是否可见不能为空", false);
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto_1.getMyDeptPlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-我的部门目标任务是否可见不能为空", false);
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto_1.getSpacePlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-高层目标任务是否可见不能为空", false);
                implementAdjustMainNavigationSortingComRespDto_2 = mobileEndShellService.implementAdjustMainNavigationSortingCom(implementAdjustMainNavigationSortingComReqDto_1)/*vcase invoke isSameApp*/;


                implementAdjustMainNavigationSortingComRespDto_1 = implementAdjustMainNavigationSortingComRespDto_2;
            }
        } else if ((reqDto != null && reqDto.getMenuOrientedIdentification() != null && reqDto.getMenuOrientedIdentification().equals("MY_PLAN"))) {
            //elseif(D2查询移动端主导航列表(公共).UCD菜单导向标识 等于 我的目标任务)  65809

            AnalysisFieldBatchDataComRespDto analysisFieldBatchDataComRespDto_4 = null;
            AnalysisFieldBatchDataComReqDto analysisFieldBatchDataComReqDto_2 = new AnalysisFieldBatchDataComReqDto();
            analysisFieldBatchDataComReqDto_2.setCustomField1("MY_PLAN");//CUSTOM_CONVENTION//sourceId:1680833_1_65826
            analysisFieldBatchDataComReqDto_2.setCustomFieldValue1("1");//CUSTOM_CONVENTION//sourceId:1680834_1_65826
            analysisFieldBatchDataComReqDto_2.setCustomField2("MY_REPORT");//CUSTOM_CONVENTION//sourceId:1680835_1_65826
            analysisFieldBatchDataComReqDto_2.setCustomFieldValue2("2");//CUSTOM_CONVENTION//sourceId:1680836_1_65826
            analysisFieldBatchDataComReqDto_2.setCustomField3("MY_DEPT_PLAN");//CUSTOM_CONVENTION//sourceId:1680837_1_65826
            analysisFieldBatchDataComReqDto_2.setCustomFieldValue3("3");//CUSTOM_CONVENTION//sourceId:1680838_1_65826
            analysisFieldBatchDataComReqDto_2.setCustomField4("SPACE_PLAN");//CUSTOM_CONVENTION//sourceId:1680839_1_65826
            analysisFieldBatchDataComReqDto_2.setCustomFieldValue4("4");//CUSTOM_CONVENTION//sourceId:1680840_1_65826
            analysisFieldBatchDataComReqDto_2.setCustomField5("MY_LEADER_PLAN");//CUSTOM_CONVENTION//sourceId:1680841_1_65826
            analysisFieldBatchDataComReqDto_2.setCustomFieldValue5("5");//CUSTOM_CONVENTION//sourceId:1680842_1_65826
            analysisFieldBatchDataComReqDto_2.setCustomField6("MY_SUBORDINATE_PLAN");//CUSTOM_CONVENTION//sourceId:1680843_1_65826
            analysisFieldBatchDataComReqDto_2.setCustomFieldValue6("6");//CUSTOM_CONVENTION//sourceId:1680844_1_65826

            /*D2-约定基层个人菜单排序单字段批量转数据集(公共)[8405]   */
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomField1(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段1不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomFieldValue1(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段值1不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomField2(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段2不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomFieldValue2(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段值2不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomField3(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段3不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomFieldValue3(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段值3不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomField4(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段4不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomFieldValue4(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段值4不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomField5(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段5不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomFieldValue5(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段值5不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomField6(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段6不能为空", false);
            Assert.isNull(analysisFieldBatchDataComReqDto_2.getCustomFieldValue6(), "D2查询移动端主导航列表(公共)-D2-约定基层个人菜单排序单字段批量转数据集(公共)-自定义字段值6不能为空", false);
            analysisFieldBatchDataComRespDto_4 = interfaceModeService.analysisFieldBatchDataCom(analysisFieldBatchDataComReqDto_2)/*vcase invoke isSameApp*/;


            ImplementAdjustMainNavigationSortingComRespDto implementAdjustMainNavigationSortingComRespDto_3 = null;
            if (analysisFieldBatchDataComRespDto_4 != null) {
                ImplementAdjustMainNavigationSortingComReqDto implementAdjustMainNavigationSortingComReqDto_2 = new ImplementAdjustMainNavigationSortingComReqDto();
                //todo dong 未找到匹配生成策略,请检查生成策略implementAdjustMainNavigationSortingComReqDto_2.setAdjustMainNavigationSortingList(reqDto.getMainNavMenusList()),数据源项; to( ==>tableName:undefined, fieldEnname:adjustMainNavigationSortingList ,uniqueId: 1679747_1_65825 uniqueSourceId:1678046_1) from (varName:undefined fieldreqDto.getMainNavMenusList())
                if (analysisFieldBatchDataComRespDto_4 != null && analysisFieldBatchDataComRespDto_4.getFieldBatchDataList() != null && !CollectionUtil.isEmpty(analysisFieldBatchDataComRespDto_4.getFieldBatchDataList())) {
                    implementAdjustMainNavigationSortingComReqDto_2.setAgreedNavigationSortingDatasetList(//objList-to-objLists
                            analysisFieldBatchDataComRespDto_4.getFieldBatchDataList().stream().map(item -> {
                                AgreedNavigationSortingDatasetDto elm = new AgreedNavigationSortingDatasetDto();
                                if (item != null) {
                                    elm.setMenuCode(item.getFieldName());//SimpleFieldAssign//sourceId:326348_2_65825
                                    elm.setMenuOrderNumber(item.getFieldValue());//SimpleFieldAssign//sourceId:326349_2_65825
                                }
                                return elm;
                            }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1679748_1_65825
                }
                if (receptionServiceRes != null) {
                    implementAdjustMainNavigationSortingComReqDto_2.setMyLeaderPlan(receptionServiceRes.getCustomField2());//SimpleFieldAssign//sourceId:1679749_1_65825
                    implementAdjustMainNavigationSortingComReqDto_2.setMySubordinatePlan(receptionServiceRes.getCustomField2());//SimpleFieldAssign//sourceId:1679750_1_65825
                    implementAdjustMainNavigationSortingComReqDto_2.setMyDeptPlan(receptionServiceRes.getCustomField1());//SimpleFieldAssign//sourceId:1679752_1_65825
                    implementAdjustMainNavigationSortingComReqDto_2.setSpacePlan(receptionServiceRes.getCustomField2());//SimpleFieldAssign//sourceId:1680454_1_65825
                }

                /*D2执行调整主导航排序(公共)[8988]   */
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto_2.getMyLeaderPlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-我分管中层目标任务是否可见不能为空", false);
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto_2.getMySubordinatePlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-我的下属目标任务是否可见不能为空", false);
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto_2.getMyDeptPlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-我的部门目标任务是否可见不能为空", false);
                Assert.isNull(implementAdjustMainNavigationSortingComReqDto_2.getSpacePlan(), "D2查询移动端主导航列表(公共)-D2执行调整主导航排序(公共)-高层目标任务是否可见不能为空", false);
                implementAdjustMainNavigationSortingComRespDto_3 = mobileEndShellService.implementAdjustMainNavigationSortingCom(implementAdjustMainNavigationSortingComReqDto_2)/*vcase invoke isSameApp*/;


                implementAdjustMainNavigationSortingComRespDto_1 = implementAdjustMainNavigationSortingComRespDto_3;
            }
        } else {
            //else  65819

//异常结束 65820
            throw new BizException("C00028", "对不起，没有数据！！", false);
        }
        QueryMobileMainNavigationListComRespDto retData = new QueryMobileMainNavigationListComRespDto();
        if (implementAdjustMainNavigationSortingComRespDto_1 != null) {
            retData.setAdjustMainNavigationSortingList(implementAdjustMainNavigationSortingComRespDto_1.getAdjustMainNavigationSortingList().stream().map(item -> BeanUtil.toBean(item, AdjustMainNavigationSortingDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1681086_1
        }


        return retData;
    }
    //
}
